<template>
  <view class="my-search-container" :style="{'background-color': bgcolor}" @click="searchBoxClick">
    <view class="my-search-box" :style="{'border-radius': radius+'px'}">
      <uni-icons type="search" size="16"></uni-icons>
      <text>搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props:{
      bgcolor:{
        type: String,
        default: '#C00000'
      },
      radius:{
        type: Number,
        default: 18
      }
      
    },
    methods:{
      searchBoxClick(){
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss" scoped>
.my-search-container {
  
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  .my-search-box{
    width: 100%;
    height: 36px;
    background-color: #FFF;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text {
      margin-left: 5px;
      font-size: 15px;
    }
  }
}
</style>